package com.self.smallma.myblogweb.dao;

import com.self.smallma.myblogweb.entity.BlogEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.self.smallma.myblogweb.vo.FirstPageBlogVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 
 * 
 * @author mahuanyu
 * @email 1914096395@qq.com
 * @date 2021-07-17 17:48:05
 */
@Mapper
public interface BlogDao extends BaseMapper<BlogEntity> {
    List<FirstPageBlogVo> getFirstPageBlog();

    @Select(" select sum(views) from t_blog")
    int getBlogViewTotal();

    void getCommentCountById(@Param("id") Long id);
}
